﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace MassSpring
{
    public abstract class ICamera
    {
        protected Vector3 cameraPosition;
        public Vector3 CameraPosition
        {
            get { return cameraPosition; }
            set { cameraPosition = value; }
        }
        protected Matrix cameraViewMatrix;
        public Matrix CameraViewMatrix
        {
            get { return cameraViewMatrix; }
        }

        public abstract Matrix MirroredCameraViewMatrix(float planeHeight);

        public ICamera(Vector3 startPosition)
        {
            this.cameraPosition = startPosition;
        }

        public void Update(GameTime gameTime)
        {
            float elapsed = (float)gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0f;
            ProcessInput(elapsed);
            UpdateViewMatrix();
        }

        protected abstract void UpdateViewMatrix();

        public abstract void ProcessInput(float elapsed);

        public abstract void LoadContent();

        public abstract void FixUp();

    }
}
